<%@page import="board.BoardVo"%>
<%@page import="board.Board"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>veiw.jsp</title>
<script>
function bList(){
	location.href='index2.jsp?inc_content=./board/list.jsp';	
}
function btnRe(s,g,d){
	location.href='index2.jsp?inc_content=./board/rep_register.jsp&serial='+s+'&grp='+g+'&deep='+d;	
}
function btDel(s,f){
	var f= confirm("정말 삭제하시겠나?");
	if(f){
		location.href='index2.jsp?inc_content=./board/delete_result.jsp&serial='+s+'&filename='+f;	
	}else{
		alert("삭제가 취소되었습니다.");
	}
		
	
}
function btModify(s){
	location.href='index2.jsp?inc_content=./board/modify.jsp&serial='+s;
}
</script>
</head>
<body>
<jsp:useBean id="boardVo" class="board.BoardVo"/>
<jsp:setProperty property="*" name="boardVo"/>
<%
Board board = new Board();
board.setVo(boardVo);
BoardVo vo= board.view();

%>

<h1>✦Community Details</h1>
<div id='butGroup'>
<input type="button" id='btList()' onclick='bList()' value='목록'>
<input type="button" id='btRe()' onclick="btnRe(<%=vo.getSerial() %>,<%=vo.getGrp() %>,'<%=vo.getDeep() %>')" value='댓글'>
<input type="button" id='btModify' onclick='btModify(<%=vo.getSerial() %>)' value='수정'>
<input type="button" id='btDel' onclick="btDel(<%=vo.getSerial() %>,'<%=vo.getFilename() %>')" value='삭제'>
</div>

<p/>

<div id='board_body'>
≫  글 번 호 <%=vo.getSerial() %><br/>
≫  작 성 자 <%=vo.getMid() %><br/>
≫  작 성 일 <%=vo.getMdate() %><br/>
≫  제    목 <%=vo.getSubject() %><br/>
≫  내    용 <%=vo.getContent() %><br/>
≫  첨 부 파 일<br/>
<% if(vo.getFilename()!=null && vo.getFilename()!=""){ %>
<div>≫  파일첨부 : <a href='#' onclick="fileDownload('<%=vo.getFilename()%>') "><%=vo.getFilename() %></a><%}%>

</div>

</div>

</body>
</html>